package cave.nice.testMessage.resources;

import javax.mail.internet.InternetAddress;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

public class InvalidEmailAddressException extends WebApplicationException {

	private static final long serialVersionUID = -5549576846512680157L;

	public InvalidEmailAddressException(InternetAddress address) {
		super (Response.status(Status.BAD_REQUEST).entity("The email address '" + address + "' is not valid").build());
	}

}
